How to deploy a compute instance with no public IP
How can I deploy a computer instance with no public IP using GCP Deployment Manager?
Looking at the yaml configuration file, I get an error if I don't include anything in accessConfigs
. networkInterfaces
is also mandatory. At the moment my configuration file for the resource looks like this:
- type: compute.v1.instance
name: cassandra-node-1
properties:
zone: europe-west2-c
machineType: https://www.googleapis.com/compute/v1/projects/affable-seat-213016/zones/europe-west2-c/machineTypes/n1-standard-1
disks:
- deviceName: boot
boot: true
autoDelete: true
initializeParams:
sourceImage: https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20181204
networkInterfaces:
- accessConfigs:
I have tried several combinations of accessConfigs
and networkInterfaces
, but so far only the ones that work are the ones with the snippet below, but that assigns a public IP to the instance.
networkInterfaces:
- accessConfigs:
- name: External NAT
type: ONE_TO_ONE_NAT
EDIT
Deploying with no accessConfig
gives error:
ERROR: (gcloud.deployment-manager.deployments.create) Error in
Operation [operation-1545956660669-57e0a1598ea49-702a8e20-89ae5f53]:
errors: -
code: CONDITION_NOT_MET
location: /deployments/test/resources/cassandra-node-1->$.properties
message: '"/networkInterfaces": domain: validation; keyword: type;
message: instance
does not match any allowed primitive type; allowed: ["array"]; found:
"null"'
google-cloud-platform google-compute-engine google-deployment-manager
add a comment |
How can I deploy a computer instance with no public IP using GCP Deployment Manager?
Looking at the yaml configuration file, I get an error if I don't include anything in accessConfigs
. networkInterfaces
is also mandatory. At the moment my configuration file for the resource looks like this:
- type: compute.v1.instance
name: cassandra-node-1
properties:
zone: europe-west2-c
machineType: https://www.googleapis.com/compute/v1/projects/affable-seat-213016/zones/europe-west2-c/machineTypes/n1-standard-1
disks:
- deviceName: boot
boot: true
autoDelete: true
initializeParams:
sourceImage: https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20181204
networkInterfaces:
- accessConfigs:
I have tried several combinations of accessConfigs
and networkInterfaces
, but so far only the ones that work are the ones with the snippet below, but that assigns a public IP to the instance.
networkInterfaces:
- accessConfigs:
- name: External NAT
type: ONE_TO_ONE_NAT
EDIT
Deploying with no accessConfig
gives error:
ERROR: (gcloud.deployment-manager.deployments.create) Error in
Operation [operation-1545956660669-57e0a1598ea49-702a8e20-89ae5f53]:
errors: -
code: CONDITION_NOT_MET
location: /deployments/test/resources/cassandra-node-1->$.properties
message: '"/networkInterfaces": domain: validation; keyword: type;
message: instance
does not match any allowed primitive type; allowed: ["array"]; found:
"null"'
google-cloud-platform google-compute-engine google-deployment-manager
add a comment |
How can I deploy a computer instance with no public IP using GCP Deployment Manager?
Looking at the yaml configuration file, I get an error if I don't include anything in accessConfigs
. networkInterfaces
is also mandatory. At the moment my configuration file for the resource looks like this:
- type: compute.v1.instance
name: cassandra-node-1
properties:
zone: europe-west2-c
machineType: https://www.googleapis.com/compute/v1/projects/affable-seat-213016/zones/europe-west2-c/machineTypes/n1-standard-1
disks:
- deviceName: boot
boot: true
autoDelete: true
initializeParams:
sourceImage: https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20181204
networkInterfaces:
- accessConfigs:
I have tried several combinations of accessConfigs
and networkInterfaces
, but so far only the ones that work are the ones with the snippet below, but that assigns a public IP to the instance.
networkInterfaces:
- accessConfigs:
- name: External NAT
type: ONE_TO_ONE_NAT
EDIT
Deploying with no accessConfig
gives error:
ERROR: (gcloud.deployment-manager.deployments.create) Error in
Operation [operation-1545956660669-57e0a1598ea49-702a8e20-89ae5f53]:
errors: -
code: CONDITION_NOT_MET
location: /deployments/test/resources/cassandra-node-1->$.properties
message: '"/networkInterfaces": domain: validation; keyword: type;
message: instance
does not match any allowed primitive type; allowed: ["array"]; found:
"null"'
google-cloud-platform google-compute-engine google-deployment-manager
How can I deploy a computer instance with no public IP using GCP Deployment Manager?
Looking at the yaml configuration file, I get an error if I don't include anything in accessConfigs
. networkInterfaces
is also mandatory. At the moment my configuration file for the resource looks like this:
- type: compute.v1.instance
name: cassandra-node-1
properties:
zone: europe-west2-c
machineType: https://www.googleapis.com/compute/v1/projects/affable-seat-213016/zones/europe-west2-c/machineTypes/n1-standard-1
disks:
- deviceName: boot
boot: true
autoDelete: true
initializeParams:
sourceImage: https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20181204
networkInterfaces:
- accessConfigs:
I have tried several combinations of accessConfigs
and networkInterfaces
, but so far only the ones that work are the ones with the snippet below, but that assigns a public IP to the instance.
networkInterfaces:
- accessConfigs:
- name: External NAT
type: ONE_TO_ONE_NAT
EDIT
Deploying with no accessConfig
gives error:
ERROR: (gcloud.deployment-manager.deployments.create) Error in
Operation [operation-1545956660669-57e0a1598ea49-702a8e20-89ae5f53]:
errors: -
code: CONDITION_NOT_MET
location: /deployments/test/resources/cassandra-node-1->$.properties
message: '"/networkInterfaces": domain: validation; keyword: type;
message: instance
does not match any allowed primitive type; allowed: ["array"]; found:
"null"'
google-cloud-platform google-compute-engine google-deployment-manager
google-cloud-platform google-compute-engine google-deployment-manager
edited 2 days ago
asked Dec 27 at 12:55
Pedro Gordo
8822928
8822928
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If you remove the accessConfigs member completely, as opposed to providing an empty accessConfigs, the instance is created without an external IP address.
Doesn't work.networkInterfaces
doesn't accept a null value. If you try to deploy without the element it gives this error:message: '"/networkInterfaces": domain: validation; keyword: type; message: instance does not match any allowed primitive type; allowed: ["array"]; found: "null"'
– Pedro Gordo
2 days ago
Yes, you still need to provide at least a network. It's the accessConfigs portion that you should remove completely.
– Zach Seils
2 days ago
1
Example:resources: - name: the-first-vm type: compute.v1.instance properties: zone: us-central1-f machineType: https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/machineTypes/f1-micro disks: - deviceName: boot type: PERSISTENT boot: true autoDelete: true initializeParams: sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9 networkInterfaces: - network: https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default
– Zach Seils
2 days ago
I didn't include the network, because as per the docs, it would use the default network. It seems a bit silly that we need to include a default value, just so DM accepts the yaml file. Thanks!
– Pedro Gordo
yesterday
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945469%2fhow-to-deploy-a-compute-instance-with-no-public-ip%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you remove the accessConfigs member completely, as opposed to providing an empty accessConfigs, the instance is created without an external IP address.
Doesn't work.networkInterfaces
doesn't accept a null value. If you try to deploy without the element it gives this error:message: '"/networkInterfaces": domain: validation; keyword: type; message: instance does not match any allowed primitive type; allowed: ["array"]; found: "null"'
– Pedro Gordo
2 days ago
Yes, you still need to provide at least a network. It's the accessConfigs portion that you should remove completely.
– Zach Seils
2 days ago
1
Example:resources: - name: the-first-vm type: compute.v1.instance properties: zone: us-central1-f machineType: https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/machineTypes/f1-micro disks: - deviceName: boot type: PERSISTENT boot: true autoDelete: true initializeParams: sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9 networkInterfaces: - network: https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default
– Zach Seils
2 days ago
I didn't include the network, because as per the docs, it would use the default network. It seems a bit silly that we need to include a default value, just so DM accepts the yaml file. Thanks!
– Pedro Gordo
yesterday
add a comment |
If you remove the accessConfigs member completely, as opposed to providing an empty accessConfigs, the instance is created without an external IP address.
Doesn't work.networkInterfaces
doesn't accept a null value. If you try to deploy without the element it gives this error:message: '"/networkInterfaces": domain: validation; keyword: type; message: instance does not match any allowed primitive type; allowed: ["array"]; found: "null"'
– Pedro Gordo
2 days ago
Yes, you still need to provide at least a network. It's the accessConfigs portion that you should remove completely.
– Zach Seils
2 days ago
1
Example:resources: - name: the-first-vm type: compute.v1.instance properties: zone: us-central1-f machineType: https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/machineTypes/f1-micro disks: - deviceName: boot type: PERSISTENT boot: true autoDelete: true initializeParams: sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9 networkInterfaces: - network: https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default
– Zach Seils
2 days ago
I didn't include the network, because as per the docs, it would use the default network. It seems a bit silly that we need to include a default value, just so DM accepts the yaml file. Thanks!
– Pedro Gordo
yesterday
add a comment |
If you remove the accessConfigs member completely, as opposed to providing an empty accessConfigs, the instance is created without an external IP address.
If you remove the accessConfigs member completely, as opposed to providing an empty accessConfigs, the instance is created without an external IP address.
answered Dec 27 at 14:41
Zach Seils
362
362
Doesn't work.networkInterfaces
doesn't accept a null value. If you try to deploy without the element it gives this error:message: '"/networkInterfaces": domain: validation; keyword: type; message: instance does not match any allowed primitive type; allowed: ["array"]; found: "null"'
– Pedro Gordo
2 days ago
Yes, you still need to provide at least a network. It's the accessConfigs portion that you should remove completely.
– Zach Seils
2 days ago
1
Example:resources: - name: the-first-vm type: compute.v1.instance properties: zone: us-central1-f machineType: https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/machineTypes/f1-micro disks: - deviceName: boot type: PERSISTENT boot: true autoDelete: true initializeParams: sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9 networkInterfaces: - network: https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default
– Zach Seils
2 days ago
I didn't include the network, because as per the docs, it would use the default network. It seems a bit silly that we need to include a default value, just so DM accepts the yaml file. Thanks!
– Pedro Gordo
yesterday
add a comment |
Doesn't work.networkInterfaces
doesn't accept a null value. If you try to deploy without the element it gives this error:message: '"/networkInterfaces": domain: validation; keyword: type; message: instance does not match any allowed primitive type; allowed: ["array"]; found: "null"'
– Pedro Gordo
2 days ago
Yes, you still need to provide at least a network. It's the accessConfigs portion that you should remove completely.
– Zach Seils
2 days ago
1
Example:resources: - name: the-first-vm type: compute.v1.instance properties: zone: us-central1-f machineType: https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/machineTypes/f1-micro disks: - deviceName: boot type: PERSISTENT boot: true autoDelete: true initializeParams: sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9 networkInterfaces: - network: https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default
– Zach Seils
2 days ago
I didn't include the network, because as per the docs, it would use the default network. It seems a bit silly that we need to include a default value, just so DM accepts the yaml file. Thanks!
– Pedro Gordo
yesterday
Doesn't work.
networkInterfaces
doesn't accept a null value. If you try to deploy without the element it gives this error: message: '"/networkInterfaces": domain: validation; keyword: type; message: instance does not match any allowed primitive type; allowed: ["array"]; found: "null"'
– Pedro Gordo
2 days ago
Doesn't work.
networkInterfaces
doesn't accept a null value. If you try to deploy without the element it gives this error: message: '"/networkInterfaces": domain: validation; keyword: type; message: instance does not match any allowed primitive type; allowed: ["array"]; found: "null"'
– Pedro Gordo
2 days ago
Yes, you still need to provide at least a network. It's the accessConfigs portion that you should remove completely.
– Zach Seils
2 days ago
Yes, you still need to provide at least a network. It's the accessConfigs portion that you should remove completely.
– Zach Seils
2 days ago
1
1
Example:
resources: - name: the-first-vm type: compute.v1.instance properties: zone: us-central1-f machineType: https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/machineTypes/f1-micro disks: - deviceName: boot type: PERSISTENT boot: true autoDelete: true initializeParams: sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9 networkInterfaces: - network: https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default
– Zach Seils
2 days ago
Example:
resources: - name: the-first-vm type: compute.v1.instance properties: zone: us-central1-f machineType: https://www.googleapis.com/compute/v1/projects/myproject/zones/us-central1-f/machineTypes/f1-micro disks: - deviceName: boot type: PERSISTENT boot: true autoDelete: true initializeParams: sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/family/debian-9 networkInterfaces: - network: https://www.googleapis.com/compute/v1/projects/myproject/global/networks/default
– Zach Seils
2 days ago
I didn't include the network, because as per the docs, it would use the default network. It seems a bit silly that we need to include a default value, just so DM accepts the yaml file. Thanks!
– Pedro Gordo
yesterday
I didn't include the network, because as per the docs, it would use the default network. It seems a bit silly that we need to include a default value, just so DM accepts the yaml file. Thanks!
– Pedro Gordo
yesterday
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53945469%2fhow-to-deploy-a-compute-instance-with-no-public-ip%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown