Tag Args
Manages an individual Transfer Family resource tag. This resource should only be used in cases where Transfer Family resources are created outside the provider (e.g., Servers without AWS Management Console) or the tag key has the aws:
prefix.
NOTE: This tagging resource should not be combined with the resource for managing the parent resource. For example, using
aws.transfer.Server
andaws.transfer.Tag
to manage tags of the same server will cause a perpetual difference where theaws.transfer.Server
resource will try to remove the tag being added by theaws.transfer.Tag
resource. NOTE: This tagging resource does not use the providerignore_tags
configuration.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.transfer.Server;
import com.pulumi.aws.transfer.ServerArgs;
import com.pulumi.aws.transfer.Tag;
import com.pulumi.aws.transfer.TagArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Server("example", ServerArgs.builder()
.identityProviderType("SERVICE_MANAGED")
.build());
var zoneId = new Tag("zoneId", TagArgs.builder()
.resourceArn(example.arn())
.key("aws:transfer:route53HostedZoneId")
.value("/hostedzone/MyHostedZoneId")
.build());
var hostname = new Tag("hostname", TagArgs.builder()
.resourceArn(example.arn())
.key("aws:transfer:customHostname")
.value("example.com")
.build());
}
}
Import
aws_transfer_tag
can be imported by using the Transfer Family resource identifier and key, separated by a comma (,
), e.g.,
$ pulumi import aws:transfer/tag:Tag example arn:aws:transfer:us-east-1:123456789012:server/s-1234567890abcdef0,Name